import unittest
from django.test.client import Client


class BasicTestCase(unittest.TestCase):
    
    def test_adding_comments(self):
        """
        This test will check that a comment is added to a document
        """
        c = Client()
        c.login(username='manager', password='manager')
        response = c.post('/documents/view_document/20/comments', {'adding_comment': 'True', 'add_subject':'This is the subject', 'comment':'this is the comment'})
        self.failUnlessEqual('This is the subject' in response.content, True)
        self.failUnlessEqual('this is the comment' in response.content, True)
